import React from 'react'

export default function Breadcrumb(items) {
  return (
    <div className="breadcrumb">
      {items.map((item, index) => (
        <span key={index}>
          {item.link ? <a href={item.link}>{item.name}</a> : <span>{item.name}</span>}
          {index < items.length - 1 && <span> / </span>}
        </span>
      ))}
    </div>
  )
}
